<<<<<<< HEAD
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../css/themes/icon.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/jquery.serializejson.min.js"></script>
</head>

<body>
    <div id="treeButtonGroup" class="easyui-panel" style="padding:5px;">
        <a href="#" class="easyui-linkbutton" data-type="1" data-options="toggle:true,group:'g1'">学生信息</a>
        <a href="#" class="easyui-linkbutton" data-type="2" data-options="toggle:true,group:'g1',selected:true">考试安排</a>
        <a href="#" class="easyui-linkbutton" data-type="3" data-options="toggle:true,group:'g1'">用户分类</a>
        <a href="#" class="easyui-linkbutton" data-type="4" data-options="toggle:true,group:'g1'">地区分类</a>
        <a href="#" class="easyui-linkbutton" data-type="5" data-options="toggle:true,group:'g1'">相册分类</a>
    </div>
    <div class="easyui-layout" style="width:200px;height:695px;float:left">
        <div data-options="region:'west',split:true" title="新闻分类" style="width:200px;">
            <ul id="tt" class="easyui-tree">
            </ul>
        </div>
    </div>
    <table id="dg" style="height:695px;float:left"></table>
</body>
<script>
    $('#dg').datagrid({
        url: `${window.parent.globalURL}users`,
        border: false,
        pagination: true,
        fitColumns: true,
        method: 'get',
        toolbar: '#tb',
        columns: [
            [{
                field: 'ck',
                checkbox: true
            }, {
                field: 'username',
                title: '用户名',
                width: 100
            }, {
                field: 'password',
                title: '密码',
                width: 100
            }, {
                field: 'studentId',
                title: '学号',
                width: 100
            }, {
                field: 'name',
                title: '姓名'
            }, {
                field: 'sex',
                title: '性别'
            }, {
                field: 'age',
                title: '年龄'
            }, {
                field: 'phone',
                title: '电话',
                width: 100
            }, {
                field: 'email',
                title: 'email',
                width: 100
            }, {
                field: 'address',
                title: '地址',
                width: 350
            }, {
                field: 'ctime',
                title: '创建时间',
                width: 250
            }, {
                field: '_id',
                title: '操作',
                width: 120,
                formatter: function(value, row, index) {
                    return `<a href="javascript:void(0)" onclick="updateData('${row._id}')">修改</a> <a href="javascript:void(0)" onclick="deleteData('${row._id}')">删除</a>`
                }
            }]
        ],

    });
    $("#treeButtonGroup a").click(function() {
        var type = $(this).attr('data-type');
        treeList(type);

    })

    function treeList(type) {
        $('#tt').tree({
            url: `${window.parent.globalURL}cate/list/${type}`
        });
    }
    treeList(1);
</script>

=======
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../css/themes/icon.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/jquery.serializejson.min.js"></script>
</head>

<body>
    <div id="treeButtonGroup" class="easyui-panel" style="padding:5px;">
        <a href="#" class="easyui-linkbutton" data-type="1" data-options="toggle:true,group:'g1'">学生信息</a>
        <a href="#" class="easyui-linkbutton" data-type="2" data-options="toggle:true,group:'g1',selected:true">考试安排</a>
        <a href="#" class="easyui-linkbutton" data-type="3" data-options="toggle:true,group:'g1'">成绩认定</a>
        <a href="#" class="easyui-linkbutton" data-type="4" data-options="toggle:true,group:'g1'">网上校园</a>
        <a href="#" class="easyui-linkbutton" data-type="5" data-options="toggle:true,group:'g1'">评论专区</a>
        <a href="#" class="easyui-linkbutton" data-type="6" data-options="toggle:true,group:'g1'">考核标准</a>
    </div>
    <div class="easyui-layout" style="width:200px;height:695px;float:left">
        <div data-options="region:'west',split:true" title="新闻分类" style="width:200px;">
            <ul id="tt" class="easyui-tree">
            </ul>
        </div>
    </div>
    <table id="dg" style="width:800px;height:695px;float:left"></table>
</body>
<script>
    $("#treeButtonGroup a").click(function() {
        var type = $(this).attr('data-type');
        treeList(type);
    })

    function treeList(type) {
        $('#tt').tree({
            url: `http://10.31.162.63:3000/cate/list/${type}`
        });
    }
    treeList(1);
    $('#treeButtonGroup a:first').on('click', function() {
        $('#dg').datagrid({
            url: 'http://10.31.162.63:3000/users',

            border: false,
            pagination: true,
            fitColumns: true,
            method: 'get',
            toolbar: '#tb',
            columns: [
                [{
                    field: 'ck',
                    checkbox: true
                }, {
                    field: 'username',
                    title: '用户名'
                }, {
                    field: 'password',
                    title: '密码'
                }, {
                    field: 'studentId',
                    title: '学号'
                }, {
                    field: 'name',
                    title: '姓名'
                }, {
                    field: 'sex',
                    title: '性别'
                }, {
                    field: 'age',
                    title: '年龄'
                }, {
                    field: 'phone',
                    title: '电话',
                    width: 100
                }, {
                    field: 'email',
                    title: 'email',
                    width: 100
                }, {
                    field: 'address',
                    title: '地址',
                    width: 150
                }, {
                    field: 'ctime',
                    title: '创建时间',
                    width: 100
                }, {
                    field: '_id',
                    title: '操作',
                    width: 80,
                    formatter: function(value, row, index) {
                        return `<a href="javascript:void(0)" onclick="updateData('${row._id}')">修改</a> <a href="javascript:void(0)" onclick="deleteData('${row._id}')">删除</a>`
                    }
                }]
            ],

        });
    })
</script>

>>>>>>> 3149a29e1f592792f6fc605dcbab84b249ce65e1
</html>